#include <iostream>
#include <cmath>
#include <vector>

using namespace std;

vector<double> Transformation(vector<double> v, float tetha) {

	vector<double> vOut(4);

	double matrix[4][4]={								// Transformationsmatrix
							{1,	0 ,0 ,0},
							{0, cos(tetha), -sin(tetha), 0},
							{0, sin(tetha), cos(tetha), 0},
							{0, 0, 0, 1}
						 };

	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 4; j++) {
			vOut[i] = vOut[i] + (v[j] * matrix[i][j]);		
		}
	}

	return vOut;
}

int main() {
	vector<double> vektor(4);
	double winkel;
	const double PI = 3.1415926535897932384626433832795;
	
	cout << "Koordinaten eingeben:" << endl << endl;
	cout << "x = ";
	cin >> vektor[0];
	cout << "y = ";
	cin >> vektor[1];
	cout << "z = ";
	cin >> vektor[2];
	cout << endl << endl;
	cout << "Winkel eingeben (Grad Bogenmass): ";
	cin >> winkel;
	cout << endl << "Rotation um " << winkel << " Grad liefert:" << endl << endl;

	vektor[3] = 1; // so stehts in der Aufgabe :)
	float tetha = (winkel * PI) / 180;
	vektor = Transformation(vektor, tetha);

	/* Ausgabe */
	cout << "Vektor nach Transformation: " << endl;
	for (int i = 0; i < 3; i++) {
		cout << "(" << (int)vektor[i] << ")" << endl;
	}
}